#ifndef _SSDP_PACKET_H_
#define _SSDP_PACKET_H_

#include <wx/wx.h>
#include <sys/queue.h>
#include <event.h>
#include <netinet/in.h>
#include "tansu_util.h"
#include "tansu_socket.h"
#include "tansu_ssdp.h"
#include "tansu_http.h"

class SsdpPacket {

public:
    SsdpPacket(int id, const struct tansu_ssdp_packet *packet)
        : m_id(id)
        , m_packet(NULL)
    {
        m_packet = tansu_ssdp_packet_clone(packet);
    }

    virtual ~SsdpPacket()
    {
        tansu_ssdp_packet_delete(m_packet);
    }

    int GetId() const { return m_id; }
    struct tansu_ssdp_packet *GetPacket() { return m_packet; }
    const struct tansu_ssdp_packet *GetPacket() const { return m_packet; }

private:

    int m_id;
    struct tansu_ssdp_packet *m_packet;

};

WX_DECLARE_LIST(SsdpPacket, SsdpPacketList);

#endif /* _SSDP_PACKET_H_ */
